package com.binance.gateway.app.constant;

import org.apache.commons.lang3.StringUtils;

public enum TokenType {
    web,
    mac,
    pc,
    appinfo,
    app;

    public static TokenType getTokenType(String clientType) {
        if (StringUtils.equalsIgnoreCase(clientType, "android") || StringUtils.equalsIgnoreCase(clientType, "ios")) {
            return app;
        } else if (StringUtils.equalsIgnoreCase(clientType, "androidinfo")
                || StringUtils.equalsIgnoreCase(clientType, "iosinfo")) {
            return appinfo;
        } else if (StringUtils.equalsIgnoreCase(clientType, "mac")) {
            return mac;
        } else if (StringUtils.equalsIgnoreCase(clientType, "pc")) {
            return pc;
        }
        return web;
    }
}
